<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""DTD/xhtml1-strict.dtd">
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/c.tld" prefix="c"%>
<%@taglib uri="/WEB-INF/fmt.tld" prefix="fmt"%>
<%@taglib uri="/WEB-INF/el.tld" prefix="el"%>
<%@taglib uri="/WEB-INF/fn.tld" prefix="fn"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<c:import url="/includes/css_inc.jsp"/>
		<c:import url="/includes/js_inc.jsp"/>
		<script>
			$(function(){
				$("#btnSearch").button({
		            icons: {
		                primary: "ui-icon-search"
		            }
				});
				$("#btnSend").button({
		            icons: {
		                primary: "ui-icon-arrowthickstop-1-n"
		            }
				}).click(function(){
					$("#job").val("send");
					$("#searchForm").submit();
				});
		        thaiDatepicker("date","#","1");
			});
		</script>
	</head>
	<body>
		<c:set var="auth" value="${el:getMapValue(menuAuth, 'ACC60309')}"/>
		<c:import url="/apps/msg.jsp"/>
		<form class="acc67-form" name="searchForm" id="searchForm" action="${pageContext.request.contextPath}/acc6" method="post" onsubmit="return validateEmpty();">
		<input type="hidden" name="app" id="app" value="ACC60309"/>
		<input type="hidden" name="job" id="job" value="${job}"/>
		<table width="100%" class="ui-widget ui-widget-content" border="0">
			<tr>
				<th align="left" class="acc67-header ui-widget-header" colspan="2"><b>${screenCode.ACC60309}</b></th>
			</tr>
			<tr>
				<td class="bold" width="10%">วันที่ : </td>
				<td>
					<input type="text" name="date" id="date"  size="12" maxlength="10" onkeypress="return numberAndSlash(event);" onblur="dateFormat(this);" value="${date}"/>
					<span class="red" id="#date">*</span>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<button type="submit" name="btnSearch" id="btnSearch" class="acc67-button">ค้นหาข้อมูล</button>
					<!-- <button type="button" name="btnSend" id="btnSend" class="acc67-button">ส่งข้อมูล</button> -->
				</td>
			</tr>
		</table>
		<br/>
		<c:if test="${!empty lsFtp}">
			<fieldset>
				<legend>ผลการค้นหาข้อมูล</legend>
					<table width="100%" class="acc67-grid ui-widget ui-widget-content" border="0">
						<tr>
							<th align="center" class="ui-state-default" >ชือไฟล์</th>
							<th align="center" class="ui-state-default" width="15%">สถานะดำเนินการ</th>
							<th align="center" class="ui-state-default" width="20%">สถานะไฟล์</th>
						</tr>
						<c:forEach var="data" items="${lsFtp}" varStatus="x">
							<tr class="grid-tr-${x.count % 2}">
								<td>${data.fileName}</td>
								<td>${el:getMapValue(mapFTPStatus,data.ftpStatus)}</td>
								<td ${data.statusFile == 'N' ? 'class=red' : ''}>${el:getMapValue(mapFTPStatus,data.statusFile)}</td>
							</tr>
						</c:forEach>
						<tr>
							<td colspan="3" align="center">
								<button type="button" name="btnSend" id="btnSend" class="acc67-button">ส่งข้อมูล</button>
							</td>
						</tr>
					</table>
			</fieldset>
		</c:if>
		</form>
	</body>
</html>